#include "include/bbullet.h"

// initialize Bullet and sets the gravity
BBDECL bBullet* __stdcall _initBullet(float gravX, float gravY, float gravZ)
{
	bBullet* b = new bBullet(gravX, gravY, gravZ);
	return b;
}

// destroy all Bullet Objects
BBDECL void __stdcall _shutDownBullet(bBullet* bullet)
{
	delete bullet;
}

// returns a pointer to the dynamicsworld
BBDECL btDiscreteDynamicsWorld* __stdcall _getDynamicsWorld(bBullet* bullet)
{
	return bullet->getDynamicsWorld();
}

// steps the simulation
BBDECL void __stdcall _updateBullet(bBullet* bullet, btScalar timeStep, int maxSubSteps, btScalar fixedTimeStep)
{
	bullet->Update(timeStep, maxSubSteps, fixedTimeStep);
}